package org.evan.spring6.iocxml.ditest;

import java.util.List;

public class Department {
    //一个部门有很多员工
    private List<Employee> employees;
    private String dname;

    public List<Employee> getEmployees() {
        return employees;
    }

    public void setEmployees(List<Employee> employees) {
        this.employees = employees;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public void info(){
        System.out.println("部门名称:" + dname);
        for (Employee employee : employees){
            System.out.println(employee.getEname());
        }
    }
}
